.TH SPI 5 "30 March 1999" "ASIM/LIP6" "File Formats"

.SH NAME

spi \- Alliance parser and driver for Spice netlist.

.so man1/alc_origin.1

.SH FILES

The description of a netlist foo must be contained  in a \fB.SUBCKT\fP of a file named \fIfoo.spi\fP. This description can include others \fB.SUBCKT\fP that must be in the same file or files included with the command \fB.INCLUDE\fP in the source file.

Recognized elements are :

.RS
Resistances

Capacitances

Instances

MOS  transistors.

.RE
Others elements are not considered.

Nodes can be either numbered or nameed. It's possible to assign a name to a node which is designated by a number with the directive

.B * NET number = name

in the \fB.SUBCKT\fP. The word NET can be replaced by positioning the environment variable \fIMBK_SPI_NETNAME\fP. Names are used to named the signals and the connectors in the \fILOFIG\fP.

On the \fB.SUBCKT\fP interface, nodes of the same name followed by a period and a number are considered to be on the net, even if no connected in the circuit. For example :

.RS
 .SUBCKT nand2 in out out.1 out.2 vss vdd out.3
.RE

The nodes out, out.1, out.2 and out.3 are considered to be the same signal of the Alliance \fILOFIG\fP. This feature can be turned off if the environment variable \fIMBK_SPI_MERGE\fP is set, and the period can be replaced by another character with the environment variable \fIMBK_SPI_SEPAR\fP.

No particular information is needed to build a \fILOFIG\fP from a \fB.SUBCKT\fP, the parser rebuild all signals, even they contains many resistances and capacitances. If names are not provided, the parser will create then in order to provide a valid lofig.

.SH DRIVER

The driver creates a Spice netlist of the \fILOFIG\fP passed as a parameter.  The file contain a single \fB.SUBCKT\fP representing the figure and commands \fB.INCLUDE\fP with name of instances contained in the \fILOFIG\fP.  Nodes are number named with the directive \fB* NET\fP, or strings, depending on \fIMBK_SPI_NAMEDNODES\fP. A comment at the beginning of the file represents the interface of the \fILOFIG\fP. This comment is not used by the parser.

Environment variable considered are

.RS
.B MBK_SPI_MODEL

.B MBK_SPI_NETNAME

.B MBK_SPI_NAMEDNODES
.RE

.SH PARSER

The parser load all \fB.SUBCKT\fP in memory, even those in files included with the command \fB.INCLUDE\fP until the required \fILOFIG\fP is loaded. For each \fB.SUBCKT\fP loaded, the parser build the equipotentials with both nodes of resistances on the same net and both nodes of capacitances on differents net unless more information is given. The RCN library is used to handle resistances and capacitances.

As the \fILOWIRE\fP can contain a resistance and a capacitance, the parser groups a resistance and two capacitances in a single \fILOWIRE\fP if the following conditions are met :

.RS
The resistance is named 'name' and the two capacitances are named 'name1' and 'name2'

The two capacitances must have the same value

The two capacitances must be between the net of the resistance and VSS.

.RE
The driver supports this feature.

Environment variable considered are

.RS
.B MBK_SPI_MODEL

.B MBK_SPI_NETNAME

.B MBK_SPI_SEPAR

.B MBK_SPI_MERGE

.B MBK_SPI_FILE

.B MBK_SPI_VERBOSE

.B MBK_SPI_ONE_NODE_NORC

.B MBK_SPI_NO_AFF_UNK
.RE

.SH ENVIRONMENT VARIABLES

.B MBK_SPI_MODEL

File name where transistors models are described. Syntax for file is :
.RS
MODELNAME N|P [FAST] [HVIO]
.RE
Blank lines are allowed, and line comment begin with a '#'.

.B MBK_SPI_NETNAME

Comment used to name the nodes. Default is
.I NET.

.B MBK_SPI_SEPAR

Character used to separate a name from a node number on the interface of the \fB.SUBCKT\fP. The parser considers nodes of the same name to be on the same equipotential. Default is '\fB.\fP'.

.B MBK_SPI_NOMERGE

If this variable is set, the parser does not merge interface nodes of the same name, but different number, on the same equipotential.

.B MBK_SPI_FILE

If this variable is set, the name of the files opened are displayed on the error output.

.B MBK_SPI_VERBOSE

If this variable is set, display debug various information on the error output.

.B MBK_SPI_ONE_NODE_NORC

If this variable is set, an RCN view is not created for a net containing only one node.

.B MBK_SPI_NO_AFF_UNK

Default behaviour of Spice parser is to display an error message when an unknown element is read in the input file. Setting this variable prevent this display. Useful when file contain command for Spice simulator.

.B MBK_SPI_NAMEDNODES

When this environment variable is set, spice netlist's nodes are named using one of the following convention, if signal name is set or no, or if signal has an RCN view :

.RS
"SIGNAL NAME" $MBK_SEPAR "RCN NODE"

"SIGNAL NAME"

SIG "SIGNAL INDEX" $MBK_SEPAR "RCN NODE"

SIG "SIGNAL INDEX"
.RE

$MBK_SEPAR is a single character defined by a environment variable with the same name.

.SH EXAMPLE

This is an example of a file generated by the Spice driver.

.nf

 * Spice description of gxor
 * Spice driver version 700
 * Date ( dd/mm/yyyy hh:mm:ss ): 29/03/1999 at 17:43:53

 * INTERF a b s vdd vdd vdd vdd vss vss vss vss 

 .INCLUDE mx2_y.spi
 .INCLUDE ndrvp_y.spi

 .subckt gxor 24 42 49 52 53 61 54 63 64 71 72 
 * NET 1 = implicit 
 * NET 4 = auxsc1 
 * NET 13 = auxsc3 
 * NET 26 = a 
 * NET 40 = b 
 * NET 49 = s 
 * NET 52 = vdd 
 * NET 65 = vss 
 xauxsc1 64 65 53 55 33 35 2 8 ndrvp_y
 xs 66 70 56 60 48 50 11 21 5 9 34 36 38 45 mx2_y
 xauxsc3 70 71 60 61 41 46 18 22 ndrvp_y
 R2_1 4 7 6
 C2_11 4 63 6.9e-15
 C2_12 7 63 6.9e-15
 R2_2 3 2 0.15
 C2_21 3 63 7.2e-16

.B [----- CUT -----]

 C4_51 69 63 6.525e-15
 C4_52 72 63 6.525e-15
 R4_6 68 69 0.001
 R4_7 68 67 0.001
 .ends gxor

.SH SEE ALSO

.B Alliance(1) MBK(1) Al(1) RCN(1) MBK_SEPAR(1)

.SH AUTHOR

Gregoire AVOT.
.I Gregoire.AVOT@lip6.fr

.so man1/alc_bug_report.1
